package edu.xlh.travel.controller.admin;

import edu.xlh.travel.common.Result;
import edu.xlh.travel.pojo.Hotel;
import edu.xlh.travel.pojo.TotalScore;
import edu.xlh.travel.service.TotalScoreService;
import edu.xlh.travel.syslog.annontion.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/totalScore")
public class TotalScoreController {
    @Autowired
    private TotalScoreService totalScoreService;

    /*
     * to totalScoreList page
     * */
    @Log("跳转总积分列表")
    @RequestMapping("/totalScoreList")
    public String sysLogList() {
        return "admin/scoremanage/totalScoreList";
    }

    @Log("查询所有的积分")
    @RequestMapping("/findAllTotalScore")
    @ResponseBody
    public Result findAllTotalScore(int page, int limit , HttpSession session) {
        return totalScoreService.findAllTotalScore(page , limit , session);
    }

    /*
     * query totalScore by condition
     * */
    @Log("条件模糊查询总积分")
    @RequestMapping("/QueryTotalScoreByCondition")
    @ResponseBody
    public Result  QueryTotalScoreByCondition(Integer page, Integer limit, TotalScore totalScore , HttpSession session) {
        return totalScoreService.QueryTotalScoreByCondition(page , limit ,totalScore , session);
    }
}
